#include<iostream>
#include<string>

using namespace std;

int main(){
	int n1, n2;
	string s;
	cin >> s;
	int n = s.length() + 2;
	n1 = n / 3;
	n2 = n / 3 + n % 3;
	for(int i = 0; i < n1-1; i++){
		cout << s[i];
		for(int j = 0; j < n2-2; j++){
			cout << ' ';
		}
		cout << s[s.length()-i-1] << endl;
	}
	for(int i = n1-1; i < s.length()-n1+1; i++){
		cout << s[i];
	}
	return 0;
}

